<%@ page import="cn.dai.util.JdbcUtils" %>
<%@ page import="java.sql.Connection" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/6/3
  Time: 11:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>处理修改，重定向面板</title>
</head>

<body>

<%@include file="../commons/encoding_setting.jsp"%>

<%
    String id = request.getParameter("id");
    String name = request.getParameter("name");
    String phone = request.getParameter("phone");
    String qq = request.getParameter("qq");

    Connection connection = JdbcUtils.getConnection();

    String sql = "UPDATE java30 SET j30_name = ?, j30_phone = ?, j30_qq = ? WHERE j30_id = ?";

    int update = JdbcUtils.update(connection, sql, new Object[]{name,phone,qq,id});

    System.out.println(update);

    if (update > 0){
        response.sendRedirect(request.getContextPath()+"/backstage/panel.jsp");
        return;
    }
%>

</body>


</html>
